package com.scofd.signature;

public enum AdditionalTextPosType {
    LeftTop, /* 左上 */
    TopCenter, /* 上中 */
    RightTop, /* 右上 */

    LeftCenter, /* 左中 */
    RightCenter, /* 右中 */

    LeftBottom, /* 左下 */
    BottomCenter, /* 下中 */
    RightBottom; /* 右下 */

    public int value;

    AdditionalTextPosType(int value) {
        this.value = value;
    }

    AdditionalTextPosType() {

    }

    public int getValue() {
        return value;
    }

    /**
     * 自定义了一个static方法，获取指定顺序的枚举
     */
    public static AdditionalTextPosType getDeviceState(int code) {
        for (AdditionalTextPosType e : AdditionalTextPosType.values()) {
            if (e.getValue() == code) {
                return e;
            }
        }
        return null;
    }

}
